//------------------------------------------------------------------------------
//此代码由工具生成
//请使用partial类进行扩展,避免修改被覆盖
//createTime:2021-03-02 17:39:31
//------------------------------------------------------------------------------
using System.Linq.Expressions;
using System;
using System.Collections.Generic;
using System.Linq;
using XKPlatform.DataModels.Dao.BaseDao;
using XKPlatform.DataModels.Dao.BaseEntity;
using XKPlatform.DataModels;
using XKPlatform.IService;
using XKPlatform.IService.IBaseService;
using FreeSql;

namespace XKPlatform.Service
{
    public partial class AutoTestService : BaseFreeSqlDao<AutoTest>, IAutoTestService
    {
        public bool AddModel(AutoTest model)
        {
            return InsertAffrows(model) > 0;
        }

        public bool BatchSave(List<AutoTest> models)
        {
            return BatchInsert(models) > 0;
        }

        public (List<AutoTest> list, long count) GetList(Expression<Func<AutoTest, bool>> where, List<SortInfo<AutoTest, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, orderbys, pageInfo);
        }

        public (List<AutoTest> list, long count) GetListByTbName(Expression<Func<AutoTest, bool>> where, string tbName, List<SortInfo<AutoTest, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, tbName, orderbys, pageInfo);
        }

        public AutoTest GetModel(Expression<Func<AutoTest, bool>> where)
        {
            return GetByOne(where);
        }

        public bool UpdateModel(AutoTest model, Expression<Func<AutoTest, bool>> where, Expression<Func<AutoTest, object>> IgnoreLmbad = null)
        {
            return Update(model, where, IgnoreLmbad);
        }
        public IUpdate<AutoTest> UpdateBySets(Expression<Func<AutoTest, bool>> where)
        {
            return this.UpdateBySet(where);
        }

    }
}
